#!/usr/bin/python
# -*- encoding:utf-8 -*-


class ListDemo:
    def _test_list_sort(self):
        """
        ld = ListDemo()
        ld._test_list_sort()
        """
        nums = []
        for i in range(3):
            nums.append(int(raw_input("please enter three num:")))
        nums.sort()
        print nums

    def _test_list_reverse(self):
        """
        ld = ListDemo()
        ld._test_list_reverse()
        """
        nums = ['hello', 'world']
        nums.reverse()
        print nums

    def _test_list_to_str(self):
        """
        ld = ListDemo()
        ld._test_list_to_str()
        """
        l = [1, 2, 3, 4, 5]
        string = ','.join(str(i) for i in l)
        print string

    def _test_list_sum_2darray(self):
        """
        ld = ListDemo()
        ld._test_list_sum_2darray()
        """
        str_2d = [[1, 2, 3], [5, 6, 7], [6, 5, 4]]
        row = len(str_2d)
        num = 0
        for i in range(row):
            num += str_2d[i][i]
        print num


if __name__ == '__main__':
    ld = ListDemo()
    ld._test_list_sum_2darray()
